<template>
  <div id="Left">
    <div style="text-align: center; margin-top: 10px">
      <a href="/">
        <img src="@/assets/logo.gif" style="width: 20% " alt="" />
        <div style="font-size: 20px; color: white">来坐吧管理系统</div>
      </a>
    </div>
    <el-menu
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      default-active="2"
      class="el-menu-demo"
    >
      <el-menu-item index="1" @click="to('/listLibrary')">
        <i class="el-icon-office-building"></i>
        <span slot="title">图书馆操作</span>
      </el-menu-item>
      <el-menu-item index="2" @click="to('/notice')">
        <i class="el-icon-bell"></i>
        <span slot="title">发布公告</span>
      </el-menu-item>
      <!-- <el-menu-item index="3" @click="to('/database')">
        <i class="el-icon-s-data"></i>
        <span slot="title">所有数据库</span>
      </el-menu-item> -->
      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-user"></i>
          <span @click="See(item.url)">用户操作</span>
        </template>
        <el-menu-item index="4-1" @click="to('/allUser')">
          <i class="el-icon-s-custom"></i>
          所有用户</el-menu-item
        >
        <el-menu-item index="4-3" @click="to('/noticeUser')">
          <i class="el-icon-paperclip"></i>
          用户通知</el-menu-item
        >
      </el-submenu>
      <el-menu-item index="5" @click="to('/reserTime')">
        <i class="el-icon-time"></i>
        <span slot="title">预约时段</span>
      </el-menu-item>
      <el-menu-item index="6" @click="to('/return')">
        <i class="el-icon-s-opportunity"></i>
        <span slot="title">用户反馈</span>
      </el-menu-item>
      
      <!-- <el-submenu index="6">
        <template slot="title">
          <i class="el-icon-s-custom"></i>
          <span>管理员操作</span>
        </template>
        <el-menu-item index="6-1" @click="to('/addAdmin')">
          <i class="el-icon-circle-plus"></i>
          新增管理员</el-menu-item
        >
        <el-menu-item index="6-2" @click="to('/listAdmin')">
          <i class="el-icon-s-operation"></i>
          管理员列表</el-menu-item
        >
      </el-submenu> -->
    </el-menu>
  </div>
</template>
<script>
export default {
  name: "Left",
  methods: {
    to(route) {
      this.$emit("to", route);
    },
    See (e) {
        window.location.href = e
      }
  },
};
</script>